import requests
from PIL import Image

# herders = {
#     'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36'


# }
png_url = 'https://www.ftest.us/captcha/default?PeyxJxPR'
# png_url = 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1585296815227&di=42eb9b273a6d4120402f40216b7d0df0&imgtype=0&src=http%3A%2F%2Fa3.att.hudong.com%2F68%2F61%2F300000839764127060614318218_950.jpg'
png = requests.get(url=png_url)
yanzhengma = png.content
requests.get(png_url,)
img = Image.open('ls.jpg')
img.show()
# if  __name__ == "__main__":
with open("ls.gif",'wb') as f:
    f.write(yanzhengma)
# print(png.content)
